﻿Option Strict On
Option Explicit On
Option Infer On

Imports System
Imports System.Collections.Generic
Imports GenDotNet.Model.Common

Public Interface IObjectData
   Inherits IBaseData

   ReadOnly Property ClassName() As String
   ReadOnly Property CollectionClassName() As String
   ReadOnly Property ReadonlyListClassName() As String
   ReadOnly Property ReadonlyClassName() As String
   ReadOnly Property ClassNamespace() As String
   ReadOnly Property Caption() As String
   ReadOnly Property OriginalName() As String
   ReadOnly Property IsLookup() As Boolean
   ReadOnly Property CanListAll() As Boolean
   ReadOnly Property ConnectionStringName() As String

   ReadOnly Property Id() As Guid

   ReadOnly Property PrimaryKey() As IPropertyData
   ReadOnly Property Properties() As List(Of IPropertyData)
   ReadOnly Property ExtraProperties() As List(Of IPropertyData)
   ReadOnly Property DescriptionProperties() As List(Of IPropertyData)
   ReadOnly Property PrimaryKeys() As List(Of IPropertyData)
   ReadOnly Property ForeignKeys() As List(Of IForeignKeyData)
   ReadOnly Property LocalizedProperties() As List(Of IPropertyData)
   ReadOnly Property Children() As List(Of IChildData)
   ReadOnly Property AlternateKeyCriteria() As List(Of ICriteriaData)
   ReadOnly Property AlternateKeySetCriteria() As List(Of ICriteriaData)
   ReadOnly Property StoredProcedure(ByVal category As StoredProcedureCategory) As IStoredProcedureData
   ReadOnly Property Privileges() As List(Of IClassPrivilegeData)
End Interface


'  <!-- This variable is an artifact of when we had some non-exposed properties 
'       with an earlier localization approach. I'm leaving it in place expecting 
'       we'll have more non-exposed properties such as timestamps -->
'  <xsl:variable name="exposedProperties" select="$properties"/>
'  <xsl:variable name="exposedChildren" select="$children[not(@Name='LocalizedData')]"/>
'  <xsl:variable name="localizedProperties" select="$properties[@IsLocalizedProperty='true']"/>
'  <xsl:variable name="insertParameters" select="$object//orm:CreateSP//orm:Parameter"/>

'<xs:attribute name="Name" type="xs:string" use="required" />
'<xs:attribute name="OriginalName" type="xs:string" use="required" />
'<xs:attribute name="SingularName" type="xs:string" use="required" />
'<xs:attribute name="PluralName" type="xs:string" use="required" />
'<xs:attribute name="DisplayName" type="xs:string" use="required" />
'<xs:attribute name="Caption" type="xs:string" use="required" />
'<xs:attribute name="PluralCaption" type="xs:string" use="required" />
'<xs:attribute name="DeletePriority" type="xs:unsignedByte" use="required" />
'<xs:attribute name="InsertPriority" type="xs:unsignedByte" use="required" />
'<xs:attribute name="TableName" type="xs:string" use="required" />
'<xs:attribute name="CollectionName" type="xs:string" use="required" />
'<xs:attribute name="Generate" type="xs:string" use="required" />
'<xs:attribute name="NoGenObject" type="xs:boolean" use="required" />
'<xs:attribute name="NoGenStoredProc" type="xs:boolean" use="required" />
'<xs:attribute name="NoGenUI" type="xs:boolean" use="required" />
'<xs:attribute name="ObjectName" type="xs:string" use="required" />
'<xs:attribute name="IsLookup" type="xs:boolean" use="required" />
'<xs:attribute name="NoChildren" type="xs:boolean" use="required" />
'<xs:attribute name="Root" type="xs:boolean" use="required" />
'<xs:attribute name="Child" type="xs:boolean" use="required" />
'<xs:attribute name="Collection" type="xs:boolean" use="required" />
'<xs:attribute name="CollectionChild" type="xs:boolean" use="required" />
'<xs:attribute name="CollectionRoot" type="xs:boolean" use="required" />
'<xs:attribute name="IsMultiParentChild" type="xs:boolean" use="required" />
'<xs:attribute name="HasSelfJoin" type="xs:boolean" use="optional" />
'<xs:attribute ref="kd:AllowListAll" use="optional" />
'<xs:attribute name="test2" type="xs:string" use="optional" />
'<xs:attribute name="test3" type="xs:string" use="optional" />
'<xs:attribute name="test4" type="xs:string" use="optional" />
'<xs:attribute ref="kd:AllowAll" use="optional" />